<#macro header>
<div id="header_container">
    <div id="header">
        <a href="#">
             
        </a>
    	<#if securityHelper.principal?has_content>
          <div class="profile">
            <table cellpadding="0" cellspacing="0">
            <tbody><tr>
              <td rowspan="2">
                <div class="profilePhoto">
                  <a href="#">
                    <img width="40" height="40" src="${base}/images/silhouette40.gif"/>
                  </a>
                </div>
              </td>
              <td class="name" valign="bottom">
                ${securityHelper.principal?default("")}              
              </td>
            </tr>
            <tr>
              <td class="editLink" valign="top">
                <a href="${base}/view/profile">
                    个人资料
                </a>              
              </td>
            </tr></tbody></table>
          </div>
        </#if>  
        <div class="linkbar">
            <#if securityHelper.principal?has_content>
                <a id="account_link" href="#">设置</a>
                |<a id="signout_link" href="${base}/logout">退出</a>
                |<a id="help_link" href="#">帮助</a>
            <#else>
                <a id="signup_link" href="#">注册</a>
            </#if>
        </div>
    </div>
</div>
</#macro>

<#macro pageTabs tabNum>
	<div id="page_tabs" class="tabs">
		<ul>
            <li <#if tabNum == 1>class="selected"<#else>class="not_selected"</#if> >
                <a href="${base}/view/index">
                    <span>书签列表</span>
                </a>
            </li>
            <li <#if tabNum == 2>class="selected"<#else>class="not_selected"</#if>>
                <a href="${base}/view/mynotebook">
                    <span>笔记本</span>
                </a>
            </li>
            <li <#if tabNum == 3>class="selected"<#else>class="not_selected"</#if>>
                <a href="${base}/view/profile">
                    <span>个人资料</span>
                </a>
            </li>
        </ul>
	</div>
</#macro>

<#macro footer>
    <div id="footer">
        <p>&copy; ShareTime | <a href="#" target="_blank">Privacy</a></p>
    </div>
</#macro>

<#macro bookmarkNavBar>
<div class="sideBox">
  <div class="boxHeader"><h2>我的书签列表</h2></div>
  <div class="boxContent">
    <ul>
      <li class="selected">
        <a href="#" onclick="$.sharetime.playlist.allPlaylists(); return false;">全部书签列表</a>
      </li>
      <li>
        <a href="#" onclick="$.sharetime.playlist.showAddPlaylistDlg(); return false;">添加书签列表</a>
      </li>
    </ul>
  </div>
</div>
</#macro>

<#macro editProfileNavBar>
<div class="sideBox">
  <div class="boxHeader"><h2>个人资料</h2></div>
  <div class="boxContent">
    <ul>
      <li class="selected">
        <a href="${base}/view/profile" ">个人资料</a>
      </li>
      <li>
        <a href="#" onclick="$.sharetime.playlist.allPlaylists(); return false;">编缉个人资料</a>
      </li>
      <li>
        <a href="#" onclick="$.sharetime.playlist.allPlaylists(); return false;">修改密码</a>
      </li>
      <li>
        <a href="#" onclick="$.sharetime.playlist.showAddPlaylistDlg(); return false;">我的照片</a>
      </li>
    </ul>
  </div>
</div>	
</#macro>

<#macro miniSearch>
  <h2>搜索</h2>
  <form method="get" action="#">
    <div class="content">
    <input id="eventSearchBox" class="text" type="text" autofocus="false" size="17" name="query"/>
    <input class="button" type="submit" value="搜索" name="search"/>
  </div>
</form>
</#macro>

<#macro input label name rules="">
  <div tabindex="-1" class="x-form-item">
    <label class="x-form-item-label" style="text-align:right;" for="${name}">${label}：</label>
    <div class="x-form-element">
      <input type="text" name="${name}" style="width:240px" size="20" class="x-form-text x-form-field ${rules}" />
    </div>
    <div class="x-form-clear-left"></div>
  </div>
</#macro>

<#macro textarea label name rules="">
	<div tabindex="-1" class="x-form-item">
    <label class="x-form-item-label" style="text-align:right;" for="${name}">${label}：</label>
    <div class="x-form-element">
      <textarea name="${name}" style="width: 240px; height: 100px;" class="x-form-textarea x-form-field ${rules}" ></textarea>
    </div>
    <div class="x-form-clear-left"></div>
  </div>
</#macro>
